package fr.cephb.operonj.core.db.binding;

import com.sleepycat.bind.tuple.TupleBinding;
import com.sleepycat.bind.tuple.TupleInput;
import com.sleepycat.bind.tuple.TupleOutput;

import fr.cephb.operonj.core.bio.ChromPosition;

public class ChromPositionBinding extends TupleBinding<ChromPosition>
	{
	@Override
	public ChromPosition entryToObject(TupleInput input)
		{
		return new ChromPosition(
			input.readInt(),
			input.readInt()
			);
		}

	@Override
	public void objectToEntry(ChromPosition c, TupleOutput output)
		{
		output.writeInt(c.getChromId());
		output.writeInt(c.getPosition());
		}
	
	}
